package com.yanqu.road.server.cmd.disperseGold.cross;

import com.yanqu.road.entity.disperseGold.DisperseGoldInfo;
import com.yanqu.road.logic.pb.DisperseGoldPb;
import com.yanqu.road.pb.cross.disperseGold.CrossDisperseGoldProto;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.command.Command;
import com.yanqu.road.server.manger.player.DisperseGoldMgr;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;
import io.netty.channel.ChannelHandlerContext;

@Cmd(code = Protocol.S_CROSS_DISPERSEGOLD_RESULT , desc = "跨服送财返回结果")
public class CrossDisperseGoldResultCmd implements Command {

    @Override
    public void execute(ChannelHandlerContext ctx, YanQuMessage packet) throws Exception {
        CrossDisperseGoldProto.CrossDisperseGoldInfoMsg reqMsg = CrossDisperseGoldProto.CrossDisperseGoldInfoMsg.parseFrom(packet.getBytes());
        DisperseGoldInfo info = DisperseGoldPb.parseToDisperseGoldInfo(reqMsg);
        DisperseGoldMgr.crossDisperseGoldResult(info);
    }
}
